import React, { Component } from 'react'
import { HashRouter as Router, Switch, Route } from "react-router-dom"
import "antd/dist/antd.css"
import "./App.css"
import CompileRoute from "./router/compile"
import routes from "./router/routes"
import Layout from "./layout"
import locale from "antd/lib/locale/zh_CN"
import { ConfigProvider } from "antd"
import 'moment/locale/zh-cn';
import moment from "moment"
moment.locale('zh-cn');
export default function App(props) {
    return (
        <ConfigProvider locale={locale}>
            <Router>
                {/* <Route component={(props) => <CompileRoute routes={routes} {...props} />} /> */}
                {/* <Switch>
                <Route path="/login" component="" />
                <Route path="/404" component={page404} />
                <Redirect to="/login" />
            </Switch> */}
                <Layout>
                    <CompileRoute routes={routes} />
                </Layout>
            </Router>
        </ConfigProvider>
    )
}